package com.xfly.app.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.ptmall.app.R;
import com.ptmall.app.base.BaseMvpActivity;
import com.ptmall.app.view.TitleBarView;

public class StoreActivity extends BaseMvpActivity implements View.OnClickListener {

    TitleBarView title_bar;

    LinearLayout kc,lb,hd,yf,xx,xstj,fx,fygl;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setView(R.layout.activity_store);
    }

    @Override
    public void initViews() {
        title_bar = findViewById(R.id.title_bar);
        lb = findViewById(R.id.lb);
        kc = findViewById(R.id.kc);
        hd = findViewById(R.id.hd);
        yf = findViewById(R.id.yf);
        xx = findViewById(R.id.xx);
        xstj = findViewById(R.id.xstj);
        fygl = findViewById(R.id.fygl);
        fx = findViewById(R.id.fx);

        title_bar.setText("我的店铺");
    }

    @Override
    public void initEvents() {
        title_bar.setOnTitleBarClickListener(new TitleBarView.TitleBarClickListener() {
            @Override
            public void leftClick() {
                finish();
            }

            @Override
            public void rightClick() {

            }
        });
        kc.setOnClickListener(this);
        lb.setOnClickListener(this);
        hd.setOnClickListener(this);
        yf.setOnClickListener(this);
        xx.setOnClickListener(this);
        xstj.setOnClickListener(this);
        fx.setOnClickListener(this);
        fygl.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.kc:
                startActivity(new Intent(getContext(),KcActivity.class));
                break;
            case R.id.lb:
                startActivity(new Intent(getContext(),LbActivity.class));
                break;
            case R.id.hd:
                startActivity(new Intent(getContext(),HdActivity.class));
                break;
            case R.id.yf:
                startActivity(new Intent(getContext(),YfActivity.class));
                break;
            case R.id.xx:
                startActivity(new Intent(getContext(),OfflineOrderActivity.class));
                break;
            case R.id.xstj:
                startActivity(new Intent(getContext(),XsActivity.class));
                break;
            case R.id.fx:
                startActivity(new Intent(getContext(),FxActivity.class));
                break;
            case R.id.fygl:
                startActivity(new Intent(getContext(),FyActivity.class));
                break;
        }
    }
}
